import request from '@/utils/request'

/**
 * 获取文章列表
 */
export const getArticleListApi = (current, pageSize) => {
  return request.get('/admin/interview/query', {
    params: {
      current,
      pageSize
    }
  })
}

/**
 * 创建文章
 */
export const createArticleApi = (form) => {
  return request.post('/admin/interview/create', form)
}

/**
 * 删除
 */
export const delArticleApi = id => {
  return request.delete('/admin/interview/remove', {
    data: {
      id
    }
  })
}

/**
 * 获取面经详情
 */
export const getArticleDetailApi = id => {
  return request.get('/admin/interview/show', {
    params: {
      id
    }
  })
}

/**
 * 编辑文章
 */
export const editArticleApi = data => {
  return request.put('/admin/interview/update', data)
}
